﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace YummyGame.Framework
{
    public class ActionBuilder_random : ActionBuilder
    {
        public override SkillActionPrototype Build(SkillDescriptorField field)
        {
            SkillActionPrototype_random random = Pools.GetSkillPrototype<SkillActionPrototype_random>().Get();
            random.threshold = ParseExpression(field, SkillKeyword.effect_random_threshold);
            random.success = ParseChildAction(field, SkillKeyword.effect_random_success);
            random.failure = ParseChildAction(field, SkillKeyword.effect_random_failure);

            return random;
        }
    }
}
